(function() {
    angular.module('app').directive('emitProductSource', ['$rootScope', function($rootScope) {
        return {
            restrict: 'A',
            scope: {
                emitProd: '='
            },
            link: function(scope, iElement, iAttrs) {

                $(iElement).on('click', function() {
                	//发送广播到product.source.component货源组件
                    $rootScope.$emit('product_source_component_modal_EV', scope.emitProd);
                });

                scope.$on('$destroy',function(){
                    $(iElement).off('click');
                });
            }
        };
    }]);

})();
